package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 课程分类对象 t_train_coursekind
 * 
 * @author ruoyi
 * @date 2022-04-07
 */
public class TTrainCoursekind extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 课程分类名称 */
    @Size(min = 0, max = 60, message = "课程分类名称长度不能超过60个字符")
    @Excel(name = "课程分类名称")
    private String name;

    /** 课程分类编码 */
    @Excel(name = "课程分类编码")
    private String code;

    /** 课程分类父级id */
    @Excel(name = "课程分类父级id")
    private Long parentid;

    /** 课程类型,1:系统课程,2:自制课程 */
    @Excel(name = "课程类型,1:系统课程,2:自制课程")
    private String coursetype;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Integer orderNum;

    /** 组织机构id */
    private Long companyid;

    private List<TTrainCoursekind> children = new ArrayList<TTrainCoursekind>();

    public List<String> listcode;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setParentid(Long parentid) 
    {
        this.parentid = parentid;
    }

    public Long getParentid() 
    {
        return parentid;
    }
    public void setCoursetype(String coursetype) 
    {
        this.coursetype = coursetype;
    }

    public String getCoursetype() 
    {
        return coursetype;
    }
    public void setOrderNum(Integer orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Integer getOrderNum() 
    {
        return orderNum;
    }

    public void setCompanyid(Long companyid)
    {
        this.companyid = companyid;
    }

    public Long getCompanyid()
    {
        return companyid;
    }

    public List<TTrainCoursekind> getChildren() {
        return children;
    }

    public void setChildren(List<TTrainCoursekind> children) {
        this.children = children;
    }

    public List<String> getListcode() {
        return listcode;
    }

    public void setListcode(List<String> listcode) {
        this.listcode = listcode;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("code", getCode())
            .append("parentid", getParentid())
            .append("coursetype", getCoursetype())
            .append("remark", getRemark())
            .append("orderNum", getOrderNum())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
